package edu.rakovic.elearning.pages;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SessionState;
import org.apache.tapestry5.ioc.annotations.Inject;

import edu.rakovic.elearning.interfaces.Application;
import edu.rakovic.elearning.interfaces.User;
import edu.rakovic.elearning.service.Applications;

public class ViewCourseApplications {
	
	@Inject
	@Property
	private Applications applications;
	
	@Property
	private Application currentApplication;
	
	// login check
	@SessionState
	private User user;

	private boolean userExists;
	
	public User getUser() {
		return user;
	}
	
	Object onActivate() {
		if (!userExists) return Login.class;
		return null;
	}
	
	

}
